<template>
  <div class="bgf padt20 padb55">
    <div class="detail_box">


      <div class="mart20">
        <div class="flex flexa mart16">
          <div class="title_lf">城市：</div>
          <div class="title_rg">{{ details.city }}</div>
        </div>
        <div class="flex flexa mart16">
          <div class="title_lf">球种：</div>
          <div class="title_rg">{{ details.ballSeed }}</div>
        </div>
        <div class="flex flexa mart16">
          <div class="title_lf">昵称： </div>
          <div class="title_rg"> {{ details.nickname }}</div>
        </div>
        <div class="flex flexa mart16">
          <div class="title_lf">类型：</div>
          <div class="title_rg">{{ type[details.type] }}</div>
        </div>
        <div class="flex flexa mart16"  v-if="[1, 2].includes(details.type)">
          <div class="title_lf">擅长位置：</div>
          <div class="title_rg">{{ details.position }}</div>
        </div>
        <div class="flex flexa mart16" v-if="[1, 2].includes(details.type)">
          <div class="title_lf">活动区域：</div>
          <div class="title_rg">{{ details.activityDomain }}</div>
        </div>

        <div class="flex flexa mart16" v-if="[3].includes(details.type)">
          <div class="title_lf">球队名称：</div>
          <div class="title_rg">{{ details.title }}</div>
        </div>
        <div class="flex flexa mart16" v-if="[3].includes(details.type)">
          <div class="title_lf">人员类型：</div>
          <div class="title_rg">{{ details.personnelType }}</div>
        </div>
        <div class="flex flexa mart16" v-if="[3].includes(details.type)">
          <div class="title_lf">约战时间：</div>
          <div class="title_rg">{{ details.appointmentTime }}</div>
        </div>
        <div class="flex flexa mart16" v-if="[3].includes(details.type)">
          <div class="title_lf">报名截止时间：</div>
          <div class="title_rg">{{ details.deadlineTime }}</div>
        </div>
        <div class="flex flexa mart16" v-if="[3].includes(details.type)">
          <div class="title_lf">费用：</div>
          <div class="title_rg">{{ details.price }}</div>
        </div>

        <div class="flex flexa mart16" v-if="[3].includes(details.type)">
          <div class="title_lf">比赛地点：</div>
          <div class="title_rg">{{ details.address }}</div>
        </div>

        <div class="flex flexa mart16">
          <div class="title_lf">手机号码：</div>
          <div class="title_rg">{{ details.mobile }}</div>
        </div>
        <div class="flex flexa mart16">
          <div class="title_lf">动态内容：</div>
          <div class="title_rg">{{ details.content }}</div>
        </div>
        <el-dialog v-model="imgShow" width="760px">
          <img class="ww100" :src="showImg" alt="">
        </el-dialog>
        <div class="flex flexa mart16">
          <div class="title_lf">动态图片：</div>
          <div v-for="item in dataArray">
            <img class="function1_content1_li2_img" @click="imgShow = true; showImg = item" :src="item" alt="">
          </div>
        </div>



      </div>

    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      list: [],
      id: this.$route.params.id,
      details: {},
      param: {},
      type: { 1: '球员找队', 2: '球队招募', 3: '约战', 4: '动态' },
      imgShow: false,
      dataArray: []
    }
  },
  created() {
    this.getData();
  },
  methods: {

    getData() {
      let that = this;
      that.fullscreenLoading = true;
      this.param.trendsId = this.id;
      console.log(this.param)
      that.$api.trendsDetailDto(this.param).then(res => {
        if (res) {

          that.details = res;
          this.dataArray = res.img.split(",");
        }
        that.fullscreenLoading = false;
      })

    },


  }
}
</script>
<style lang="scss" scoped>
.detail_box {
  width: 98%;
  margin-left: 1%;

  .detail_tit {
    width: calc(100% - 40px);
    padding: 0 20px;
    height: 85px;
    background: #f5f5f7;

    .detail_tit_lf {
      font-size: 24px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #1d1d1d;
    }

    // .detail_tit_rg {
    //   width: 123px;
    //   height: 54px;
    //   background: #006dff;
    //   font-size: 16px;
    //   font-family: MicrosoftYaHei;
    //   color: #ffffff;
    //   text-align: center;
    //   line-height: 54px;
    // }
  }

  .detail_msg {
    width: calc(100% - 20px);
    padding: 0 20px;
    height: 48px;
    background: #f7f8fa;
    line-height: 48px;
  }

  .lf_msg {
    font-size: 18px;
    font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
    font-weight: bold;
    color: #1d1d1d;
  }

  .title_lf {
    font-size: 14px;
    font-family: MicrosoftYaHei;
    color: #989898;
  }

  .title_rg {
    font-size: 14px;
    font-family: MicrosoftYaHei;
    color: #242424;
  }

  .copy {
    font-size: 14px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #337eff;
  }
}

.activity_msg_img {
  width: 66px;
  height: 40px;
  background: #d8d8d8;
  border-radius: 8px;
}

.activity_msg_tit {
  font-size: 12px;
  font-family: MicrosoftYaHei;
  color: #1d1d1d;
}

.function1_content1_li2_img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.function12 {
  padding: 20px;
  background-color: #fff;
  margin: 0;

  .function1_state1 {
    background: #F5F6FA;
    padding: 20px 24px;
    display: flex;

    .function1_state1_title1 {
      color: #1e1e1e;
      font-size: 24px;
      font-weight: 600;
    }

    .function1_state1_button1 {
      width: 115px;
      margin-left: 20px;
    }

  }

  .function1_title1 {
    background: #F7F8FA;
    padding: 0 18px;
    line-height: 48px;
    color: #1D1D1D;
    font-size: 14px;
    margin-top: 30px;
    text-align: left;
  }

  .function1_content1 {
    display: flex;
    flex-wrap: wrap;

    .function1_content1_li1 {
      display: flex;
      margin-right: 40px;
      margin-top: 20px;

      .function1_content1_li1_title1 {
        margin-left: 20px;
        font-size: 14px;
        color: #666;
        display: inline-block;
        line-height: 20px;
      }

      .function1_content1_li1_content1 {
        font-size: 14px;
        color: #666;
        display: inline-block;
        line-height: 20px;
      }

      .function1_content1_li1_button1 {
        font-size: 14px;
        color: #0771FF;
        display: inline-block;
        line-height: 20px;
        margin-left: 10px;
        cursor: pointer
      }
    }

    .function1_content1_li2 {
      width: 100%;
      display: flex;
      margin-right: 40px;
      margin-top: 20px;
      box-sizing: border-box;

      .function1_content1_li2_title1 {
        margin-left: 20px;
        font-size: 14px;
        color: #666;
        display: inline-block;
        line-height: 20px;
      }

      .function1_content1_li2_img {
        width: 50px;
        height: 50px;
        border-radius: 50%;
      }
    }
  }
}</style>